Conversation
|
📝 WalkthroughWalkthroughAdds the Effect language-service plugin and its devDependency, configures the plugin in ChangesEffect Language Service Integration
Nx Ignore Update
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
View your CI Pipeline Execution ↗ for commit 66a60c5
☁️ Nx Cloud last updated this comment at |
@forgerock/davinci-client
@forgerock/device-client
@forgerock/journey-client
@forgerock/oidc-client
@forgerock/protect
@forgerock/sdk-types
@forgerock/sdk-utilities
@forgerock/iframe-manager
@forgerock/sdk-logger
@forgerock/sdk-oidc
@forgerock/sdk-request-middleware
@forgerock/storage
commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project status has failed because the head coverage (17.61%) is below the target coverage (40.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #576 +/- ##
===========================================
- Coverage 70.90% 17.61% -53.29%
===========================================
Files 53 154 +101
Lines 2021 24243 +22222
Branches 377 1160 +783
===========================================
+ Hits 1433 4271 +2838
- Misses 588 19972 +19384 🚀 New features to boost your workflow:
|
|
Deployed 4aa8612 to https://ForgeRock.github.io/ping-javascript-sdk/pr-576/4aa8612649b67907a585e8bcdfdd6672476a0a3e branch gh-pages in ForgeRock/ping-javascript-sdk |
📦 Bundle Size Analysis📦 Bundle Size Analysis🚨 Significant Changes🔻 @forgerock/device-client - 0.0 KB (-10.0 KB, -100.0%) ➖ No Changes➖ @forgerock/device-client - 10.0 KB 14 packages analyzed • Baseline from latest Legend🆕 New package ℹ️ How bundle sizes are calculated
🔄 Updated automatically on each push to this PR |
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (2)
tsconfig.base.json (1)
8-86:⚠️ Potential issue | 🟠 Major | ⚡ Quick winPlugin configuration is inert without
@effect/language-serviceinstalledThe
"name": "@effect/language-service"plugin incompilerOptions.pluginsrequires the@effect/language-servicenpm package. Since only@effect/tsgois installed inpackage.json, TypeScript (both tsserver and ts-patch) will silently fail to load this plugin, rendering the entire block a no-op. See the comment onpackage.jsonfor the package fix.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tsconfig.base.json` around lines 8 - 86, The tsconfig plugin entry "name": "@effect/language-service" in compilerOptions.plugins is inert because the `@effect/language-service` package is not installed; install and add the missing package (or remove/disable the plugin entry) so the plugin actually loads. Update package.json to include "@effect/language-service" (matching the plugin name) and run npm/yarn install, or alternatively remove the plugin object from the "plugins" array in tsconfig.base.json to avoid silent no-op behavior; ensure you reference the "name": "@effect/language-service" plugin entry when making the change.package.json (1)
55-55:⚠️ Potential issue | 🟠 Major | ⚡ Quick win
@effect/tsgoand@effect/language-serviceare distinct packages — the wrong one is installed
@effect/tsgois a TypeScript-Go binary replacement that provides the Effect LSP experience on top of the Go-based TypeScript compiler, whereas@effect/language-serviceis the TypeScript language service plugin package that must be installed directly (npm install@effect/language-service--save-dev) for the traditional tsserver plugin mechanism.
tsconfig.base.jsonreferences"name": "@effect/language-service"incompilerOptions.plugins. TypeScript resolves plugin names as NPM package names, so it will try to load the@effect/language-servicemodule — which is not installed.@effect/tsgodoes not provide a module resolvable under that name via Node.js.Additionally, the TypeScript-Go version of the Effect LSP should be considered in Alpha with breaking changes expected between releases, and it still requires
@typescript/native-previewalongside@effect/tsgo— which is also absent fromdevDependencies.This project uses TypeScript 5.8.3 + ts-patch (not tsgo), so the correct package to add is
@effect/language-service:🔧 Proposed fix
- "@effect/tsgo": "^0.5.1", + "@effect/language-service": "latest",#!/bin/bash # Verify whether `@effect/language-service` or `@effect/tsgo` is resolvable as a TS plugin rg -n "language-service\|tsgo" package.json pnpm-lock.yaml 2>/dev/null | head -40🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@package.json` at line 55, package.json currently installs `@effect/tsgo` but tsconfig expects the plugin "@effect/language-service"; update devDependencies by removing `@effect/tsgo` and adding `@effect/language-service` (install with your package manager), ensure the compilerOptions.plugins entry remains "name": "@effect/language-service", and if you intentionally use the TypeScript-Go LSP add the required `@typescript/native-preview` plus the matching tsgo toolchain—otherwise omit tsgo/native-preview when using ts-patch; after changes run your install command to update lockfiles.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tsconfig.base.json`:
- Around line 74-84: The tsconfig override currently sets
diagnosticSeverity.floatingEffect to "error" for all files matching
"src/**/*.ts", which will cause build failures once `@effect/language-service`
diagnostics are enabled; change the override in the "overrides" block so that
"diagnosticSeverity.floatingEffect" is lowered to "warning" (or restrict the
"include" pattern to a single package) and keep
"ignoreEffectErrorsInTscExitCode" behavior in mind (the flag referenced as
ignoreEffectErrorsInTscExitCode) so the repo-wide tsconfig.base.json does not
immediately escalate unassigned Effect expressions to tsc errors across all
packages.
---
Duplicate comments:
In `@package.json`:
- Line 55: package.json currently installs `@effect/tsgo` but tsconfig expects the
plugin "@effect/language-service"; update devDependencies by removing
`@effect/tsgo` and adding `@effect/language-service` (install with your package
manager), ensure the compilerOptions.plugins entry remains "name":
"@effect/language-service", and if you intentionally use the TypeScript-Go LSP
add the required `@typescript/native-preview` plus the matching tsgo
toolchain—otherwise omit tsgo/native-preview when using ts-patch; after changes
run your install command to update lockfiles.
In `@tsconfig.base.json`:
- Around line 8-86: The tsconfig plugin entry "name": "@effect/language-service"
in compilerOptions.plugins is inert because the `@effect/language-service` package
is not installed; install and add the missing package (or remove/disable the
plugin entry) so the plugin actually loads. Update package.json to include
"@effect/language-service" (matching the plugin name) and run npm/yarn install,
or alternatively remove the plugin object from the "plugins" array in
tsconfig.base.json to avoid silent no-op behavior; ensure you reference the
"name": "@effect/language-service" plugin entry when making the change.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 5e1e9606-0ecf-4e6c-b798-c7fdd93cf55b
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (4)
.gitignore.nxignorepackage.jsontsconfig.base.json
| // Ordered per-file diagnostic option overrides. (default: [{"include":["src/**/*.ts"],"options":{"diagnosticSeverity":{"floatingEffect":"error"}}}]) | ||
| "overrides": [ | ||
| { | ||
| "include": ["src/**/*.ts"], | ||
| "options": { | ||
| "diagnosticSeverity": { | ||
| "floatingEffect": "error" | ||
| } | ||
| } | ||
| } | ||
| ] |
There was a problem hiding this comment.
floatingEffect: "error" across all src/**/*.ts is a potentially build-breaking default for the entire monorepo
Once @effect/language-service is correctly installed and build-time diagnostics are enabled (via effect-language-service patch or the transform key), the floatingEffect diagnostic will emit a tsc error for any unassigned Effect expression (e.g., Effect.succeed(1) without being yielded or assigned). With ignoreEffectErrorsInTscExitCode: false (line 32), these errors will fail the build.
Applying this as an error across src/**/*.ts in a monorepo baseline config means every package that extends tsconfig.base.json inherits this strictness immediately. A codebase-wide audit for floating Effects should be done before this is activated, or the override should start at "warning" severity and be promoted to "error" after the codebase is clean:
💡 Safer initial severity
"overrides": [
{
"include": ["src/**/*.ts"],
"options": {
"diagnosticSeverity": {
- "floatingEffect": "error"
+ "floatingEffect": "warning"
}
}
}
]📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| // Ordered per-file diagnostic option overrides. (default: [{"include":["src/**/*.ts"],"options":{"diagnosticSeverity":{"floatingEffect":"error"}}}]) | |
| "overrides": [ | |
| { | |
| "include": ["src/**/*.ts"], | |
| "options": { | |
| "diagnosticSeverity": { | |
| "floatingEffect": "error" | |
| } | |
| } | |
| } | |
| ] | |
| // Ordered per-file diagnostic option overrides. (default: [{"include":["src/**/*.ts"],"options":{"diagnosticSeverity":{"floatingEffect":"error"}}}]) | |
| "overrides": [ | |
| { | |
| "include": ["src/**/*.ts"], | |
| "options": { | |
| "diagnosticSeverity": { | |
| "floatingEffect": "warning" | |
| } | |
| } | |
| } | |
| ] |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@tsconfig.base.json` around lines 74 - 84, The tsconfig override currently
sets diagnosticSeverity.floatingEffect to "error" for all files matching
"src/**/*.ts", which will cause build failures once `@effect/language-service`
diagnostics are enabled; change the override in the "overrides" block so that
"diagnosticSeverity.floatingEffect" is lowered to "warning" (or restrict the
"include" pattern to a single package) and keep
"ignoreEffectErrorsInTscExitCode" behavior in mind (the flag referenced as
ignoreEffectErrorsInTscExitCode) so the repo-wide tsconfig.base.json does not
immediately escalate unassigned Effect expressions to tsc errors across all
packages.
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@package.json`:
- Line 55: The package.json is missing the required companion package
`@typescript/native-preview` required by `@effect/tsgo`; add
"@typescript/native-preview": "<latest-compatible-version>" alongside
"@effect/tsgo" in your dependencies or devDependencies in package.json (near the
existing "@effect/tsgo" entry) and run your package manager to install so the
effect-tsgo language server works correctly.
- Line 55: The package dependency "@effect/tsgo": "^0.5.1" should be pinned to
an exact version to avoid automatic minor/patch upgrades; update the dependency
entry in package.json by replacing the caret semver specifier (e.g., "^0.5.1")
with the exact version string (e.g., "0.5.1") for the "@effect/tsgo" dependency
so the project will not pull in unintended breaking changes from Alpha releases.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: ab829b28-e604-4a01-b486-d2e243d87370
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (3)
.nxignorepackage.jsontsconfig.base.json
✅ Files skipped from review due to trivial changes (1)
- tsconfig.base.json
| "@commitlint/config-conventional": "^20.0.0", | ||
| "@commitlint/prompt": "^20.0.0", | ||
| "@effect/cli": "catalog:effect", | ||
| "@effect/tsgo": "^0.5.1", |
There was a problem hiding this comment.
Missing required companion package @typescript/native-preview.
The @effect/tsgo docs state: "At the moment, you still need the standard native TypeScript install (@typescript/native-preview) alongside @effect/tsgo." Without it, developers configuring their editor to use effect-tsgo as the language server may encounter failures.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@package.json` at line 55, The package.json is missing the required companion
package `@typescript/native-preview` required by `@effect/tsgo`; add
"@typescript/native-preview": "<latest-compatible-version>" alongside
"@effect/tsgo" in your dependencies or devDependencies in package.json (near the
existing "@effect/tsgo" entry) and run your package manager to install so the
effect-tsgo language server works correctly.
🧩 Analysis chain
🌐 Web query:
What is the latest stable version of @effect/tsgo on npm? Is 0.5.1 still current?
💡 Result:
Latest stable version of @effect/tsgo on npm: 0.5.1 (i.e., 0.5.1 is the most recent released patch listed for the @effect/tsgo package in the project’s changelog) [1]. Is 0.5.1 still current as of 2026-05-05? Yes—there’s an explicit 0.5.1 entry in the @effect/tsgo changelog [1], and the repository’s recent release automation shows version packaging activity around later dates without contradicting 0.5.1 being the latest for the root @effect/tsgo package [2][3]. Note: @effect/tsgo is described by the project as “currently in Alpha,” so “stable” here refers to the latest published release number, not to a non-alpha maturity level [4].
Citations:
- 1: https://github.com/Effect-TS/tsgo/blob/main/_packages/tsgo/CHANGELOG.md
- 2: Version Packages Effect-TS/tsgo#82
- 3: Effect-TS/tsgo@74812ef
- 4: https://effect-ts-tsgo.mintlify.app/
🏁 Script executed:
# Check if `@typescript/native-preview` is in package.json
rg "@typescript/native-preview" package.jsonRepository: ForgeRock/ping-javascript-sdk
Length of output: 55
🏁 Script executed:
# List all dependencies and devDependencies in package.json to verify `@effect/tsgo` context
cat -n package.json | sed -n '40,70p'Repository: ForgeRock/ping-javascript-sdk
Length of output: 1203
Pin @effect/tsgo to an exact version — it's explicitly Alpha.
@effect/tsgo is in Alpha and the upstream project warns to expect breaking changes between releases. Using ^0.5.1 allows automatic minor bumps that can silently break the plugin configuration committed in tsconfig.base.json.
Pin to the exact version to prevent uncontrolled upgrades:
📌 Proposed fix
- "@effect/tsgo": "^0.5.1",
+ "@effect/tsgo": "0.5.1",📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "@effect/tsgo": "^0.5.1", | |
| "@effect/tsgo": "0.5.1", |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@package.json` at line 55, The package dependency "@effect/tsgo": "^0.5.1"
should be pinned to an exact version to avoid automatic minor/patch upgrades;
update the dependency entry in package.json by replacing the caret semver
specifier (e.g., "^0.5.1") with the exact version string (e.g., "0.5.1") for the
"@effect/tsgo" dependency so the project will not pull in unintended breaking
changes from Alpha releases.
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tsconfig.base.json`:
- Around line 15-16: Replace the unrecognized compiler option key
"includeSuggestionsInTsc" with the correct `@effect/language-service` option name
"ignoreEffectSuggestionsInTscExitCode" in the tsconfig JSON so the plugin reads
the setting; locate the existing "includeSuggestionsInTsc" entry and rename it
to "ignoreEffectSuggestionsInTscExitCode" preserving the boolean value (true).
- Around line 8-10: Root tsconfig.base.json references the TypeScript plugin
"@effect/language-service" but that package is not declared in the root
package.json; add "@effect/language-service" to the root package.json
devDependencies (matching the version you want for the workspace, for example
the same major as "@effect/tsgo"), run your package manager to install/update
the lockfile, and ensure the plugin name in tsconfig.base.json
("@effect/language-service") remains unchanged so the TypeScript language
service can be resolved for all workspace packages.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 99dcfc02-71b4-4747-8dcc-ab9aac2a9a14
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (3)
.nxignorepackage.jsontsconfig.base.json
🚧 Files skipped from review as they are similar to previous changes (1)
- package.json
| "plugins": [ | ||
| { | ||
| "name": "@effect/language-service", |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify whether the configured TS plugin package is explicitly declared.
set -euo pipefail
echo "Checking package manifests for direct dependency declarations..."
fd -i 'package.json' -X sh -c '
for f in "$@"; do
echo "--- $f"
jq -r '"'"'
[
.dependencies["@effect/language-service"],
.devDependencies["@effect/language-service"],
.dependencies["@effect/tsgo"],
.devDependencies["@effect/tsgo"]
] | `@json`
'"'"' "$f"
done
' shRepository: ForgeRock/ping-javascript-sdk
Length of output: 2058
🏁 Script executed:
# Find tsconfig.base.json location and check its content
fd 'tsconfig\.base\.json' -x cat {}Repository: ForgeRock/ping-javascript-sdk
Length of output: 4350
🏁 Script executed:
# Check the monorepo structure and how workspaces/extends are configured
cat -n package.json | head -50Repository: ForgeRock/ping-javascript-sdk
Length of output: 2706
🏁 Script executed:
# Look for any tsconfig.json files that extend tsconfig.base.json
rg '"extends":\s*"[^"]*tsconfig\.base' -A 2 -B 2Repository: ForgeRock/ping-javascript-sdk
Length of output: 13380
Add an explicit dependency for the configured TypeScript language service plugin.
The tsconfig.base.json at the repository root configures @effect/language-service as a TypeScript plugin, but this package is not declared in the root package.json—only @effect/tsgo is present. Since all child workspace packages extend this root tsconfig, TypeScript will fail to load the plugin unless the dependency is explicitly available at the root level. This affects every package in the monorepo and can cause failures in IDE language services and type checking.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@tsconfig.base.json` around lines 8 - 10, Root tsconfig.base.json references
the TypeScript plugin "@effect/language-service" but that package is not
declared in the root package.json; add "@effect/language-service" to the root
package.json devDependencies (matching the version you want for the workspace,
for example the same major as "@effect/tsgo"), run your package manager to
install/update the lockfile, and ensure the plugin name in tsconfig.base.json
("@effect/language-service") remains unchanged so the TypeScript language
service can be resolved for all workspace packages.
| // When false, suggestion-level Effect diagnostics are omitted from tsc CLI output. (default: true) | ||
| "includeSuggestionsInTsc": true, |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
For @effect/language-serviceplugin configuration, is the valid option nameincludeSuggestionsInTscorincludeSuggestionsInTscExitCode? Please provide the official docs/source defining the plugin option schema.
💡 Result:
The valid option name is ignoreEffectSuggestionsInTscExitCode (there is no includeSuggestionsInTsc or includeSuggestionsInTscExitCode in the official plugin option schema/docs). Official schema/docs defining the plugin option names: 1) The published JSON schema for the VSCode/tsserver plugin is shipped as schema.json in the package, and is referenced in the npm README. It’s accessible locally at ./node_modules/@effect/language-service/schema.json or remotely from the repo (URL may drift with versions) [1]. 2) The plugin option is documented in the Effect Language Service configuration docs under the “Exit code control” / diagnostic severity section as ignoreEffectSuggestionsInTscExitCode (default true) [2]. Evidence for the exact option key: - The configuration docs list ignoreEffectSuggestionsInTscExitCode (default: true) and explain that when true, Effect diagnostics at suggestion or message severity do not cause a non-zero tsc exit code [2]. - The README/plugin source comments show the same exact key ignoreEffectSuggestionsInTscExitCode alongside the related options for warnings/errors [3]. So, use: "ignoreEffectSuggestionsInTscExitCode": true|false not includeSuggestionsInTsc*.
Citations:
- 1: https://www.npmjs.com/package/%40effect%2Flanguage-service
- 2: https://www.mintlify.com/Effect-TS/tsgo/configuration/diagnostic-severity
- 3: https://github.com/Effect-TS/language-service
Replace "includeSuggestionsInTsc" with "ignoreEffectSuggestionsInTscExitCode" at line 16.
The option name "includeSuggestionsInTsc" is not recognized by the @effect/language-service plugin schema. The correct option name is "ignoreEffectSuggestionsInTscExitCode". The current setting will be silently ignored by the plugin.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@tsconfig.base.json` around lines 15 - 16, Replace the unrecognized compiler
option key "includeSuggestionsInTsc" with the correct `@effect/language-service`
option name "ignoreEffectSuggestionsInTscExitCode" in the tsconfig JSON so the
plugin reads the setting; locate the existing "includeSuggestionsInTsc" entry
and rename it to "ignoreEffectSuggestionsInTscExitCode" preserving the boolean
value (true).
JIRA Ticket
N/A
Description
Add LSP Plugin.
Summary by CodeRabbit